﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ISSMoviePlex.BLL;

namespace ISSMoviePlex.Admin
{
    public partial class Member : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void MemberGridView_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "ChangeAccountStatus")
            {
                LinkButton linkChangeAccountStatus = (LinkButton)e.CommandSource;
                int memberId = int.Parse(linkChangeAccountStatus.CommandArgument);
                AccountBLL accLogic = new AccountBLL();
                accLogic.ChangeAccountStatus(memberId);
                MemberGridView.DataBind();
            }        
        }
    }
}